for i = 1, #KEYS, 1 do
    local stock = tonumber(redis.call('get', KEYS[i]))
    local num = tonumber(ARGV[i])
    if (stock < num) then
      return 500
    end
end
for i = 1, #KEYS, 1 do
    local num = tonumber(ARGV[i])
    redis.call('incrby', KEYS[i], 0 - num)
end
return 200